home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / fpc / demos / asltest.pas next >
Pascal/Delphi Source File  |  1998-09-22  |  959b  |  34 lines

  1. PROGRAM AslTest;
  2.  
  3. uses Exec, Utility, Asl;
  4.  
  5. {$I tagutils.inc}
  6.  
  7. VAR
  8.     fr    : pFileRequester;
  9.     dummy : BOOLEAN;
  10.     thetags : array [0..3] of tTagItem;
  11. BEGIN
  12.     AslBase := OpenLibrary(AslName,37);
  13.     IF AslBase <> NIL THEN BEGIN
  14.        thetags[0] := TagItem(ASLFR_InitialPattern,Longint(PChar('#?'#0)));
  15.        thetags[1] := TagItem(ASLFR_TitleText,Longint(PChar('Test av ASL-Requester by NS'#0)));
  16.        thetags[2] := TagItem(ASLFR_DoPatterns,1);
  17.        thetags[3].ti_Tag := TAG_DONE;
  18.  
  19.        fr := AllocAslRequest(ASL_FileRequest,@thetags);
  20.        IF fr <> nil THEN BEGIN
  21.            dummy := AslRequest(fr,NIL);
  22.            if dummy then begin
  23.               writeln('The path is     :',fr^.rf_Dir);
  24.               writeln('And the file is :',fr^.rf_File);
  25.            end else writeln('You canceled');
  26.            FreeAslRequest(fr);
  27.        END;
  28.     CloseLibrary(AslBase);
  29.     END else writeln('no asl.library');
  30. END.
  31.  
  32.  
  33.  
  34.